f0b8db93f040f5efd82de2947caec8626e3cae9c,htroot/Connections_p.java,Connections_p,respond,#RequestHeader#serverObjects#serverSwitch#,54

Before Change


        
        /* waiting for all threads to finish */
        int count  = serverCore.sessionThreadGroup.activeCount();    
        final Thread[] threadList = new Thread[((serverCore) httpd).getJobCount()];     
        count = serverCore.sessionThreadGroup.enumerate(threadList);
        
        // determines if name lookup should be done or not 
        boolean doNameLookup = false;
        if (post != null) {  
            if (post.containsKey("nameLookup") && post.get("nameLookup","true").equals("true")) {
                doNameLookup = true;
            }
            if (post.containsKey("closeServerSession")) {
                final String sessionName = post.get("closeServerSession", null);
                sb.closeSessions("10_httpd", sessionName);
                prop.put("LOCATION","");
                return prop;                
            }
        }  
        
        int idx = 0, numActiveRunning = 0, numActivePending = 0;
        boolean dark = true;
        for ( int currentThreadIdx = 0; currentThreadIdx < count; currentThreadIdx++ )  {
            final Thread t = threadList[currentThreadIdx];
            if ((t != null) && (t instanceof serverCore.Session) && (t.isAlive())) {
                // get the session object
                final Session s = ((Session) t);
                
                // get the session runtime
                final long sessionTime = s.getTime();

After Change


        // waiting for all threads to finish
        int idx = 0, numActiveRunning = 0, numActivePending = 0;
        boolean dark = true;
        for (Session s: ((serverCore) httpd).getJobList()) {
            if (!s.isAlive()) continue;
            
            // get the session runtime